from flask import Flask
from parseReport.Config import Config
from parseReport.database import db
from flask_cors import CORS, cross_origin



app = Flask(__name__)

from parseReport.AlipayInfo import alipay_info_bp
from parseReport.WxpaInfo import wx_info_bp


if __name__ == '__main__':
    CORS(app, resources=r'/*')
    app.config['SQLALCHEMY_DATABASE_URI'] = Config.SQLALCHEMY_DATABASE_URI
    app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = Config.SQLALCHEMY_TRACK_MODIFICATIONS
    # 初始化 SQLAlchemy
    db.init_app(app)
    app.register_blueprint(alipay_info_bp)
    app.register_blueprint(wx_info_bp)
    app.config['JSON_AS_ASCII'] = False
    app.run( host='0.0.0.0', port=8084,debug=True)
